<?php
/*
 * @author eBIZ Team <dev@jungo.com.cn>
 * @copyright  Copyright (c) , ShenZhen JunGO Technology Co., Ltd. All rights reserved.
 * @license  Commercial authorization, unauthorized use and modification are prohibited
 * @url www.jungo.com.cn
 */

namespace ckeeper\entity;


use ckeeper\dao\ManagerDao;

class ManagerEntity
{
    const NULL_SUBSTITUTES = ':null';

    public int $id;

    public string $uuid;

    public string $name;

    public string $avatar;

    public string $roles;

    public string $username;

    public string $password;

    public string $salt;

    public string $mobile = ':null';

    public string $email = ':null';

    public string $create_time;

    public string $update_time = '0';

    public string $delete_time = '0';

    public string $token = ':null';

    public string $status = 'normal';

    /**
     * @return string
     */
    public function getMobile(): string
    {
        if ($this->mobile === ':null') {
            return '';
        }
        return $this->mobile;
    }

    /**
     * @param string $mobile
     * @return ManagerEntity
     */
    public function setMobile(string $mobile): ManagerEntity
    {
        if (is_null($mobile)) {
            $mobile = ':null';
        }
        $this->mobile = $mobile;
        return $this;
    }

    /**
     * @return string
     */
    public function getEmail(): string
    {
        if ($this->email === ':null') {
            return '';
        }
        return $this->email;
    }

    /**
     * @param string $email
     * @return ManagerEntity
     */
    public function setEmail(string $email): ManagerEntity
    {
        if (is_null($email)) {
            $email = ':null';
        }
        $this->email = $email;
        return $this;
    }

    /**
     * @return int
     */
    public function getId(): int
    {
        return $this->id;
    }

    /**
     * @return string
     */
    public function getUuid(): string
    {
        return $this->uuid;
    }

    /**
     * @param string $uuid
     * @return ManagerEntity
     */
    public function setUuid(string $uuid): ManagerEntity
    {
        $this->uuid = $uuid;
        return $this;

    }

    /**
     * @return string
     */
    public function getName(): string
    {
        return $this->name;
    }

    /**
     * @param string $name
     * @return ManagerEntity
     */
    public function setName(string $name): ManagerEntity
    {
        $this->name = $name;
        return $this;
    }

    /**
     * @return string
     */
    public function getAvatar(): string
    {
        return $this->avatar;
    }

    /**
     * @param string $avatar
     * @return ManagerEntity
     */
    public function setAvatar(string $avatar): ManagerEntity
    {
        $this->avatar = $avatar;
        return $this;
    }

    /**
     * @return string
     */
    public function getRoles(): string
    {
        return $this->roles;
    }

    /**
     * @param string $roles
     */
    public function setRoles(string $roles): void
    {
        $this->roles = $roles;
    }

    /**
     * @return string
     */
    public function getUsername(): string
    {
        return $this->username;
    }

    /**
     * @param string $username
     * @return ManagerEntity
     */
    public function setUsername(string $username): ManagerEntity
    {
        $this->username = $username;
        return $this;
    }

    /**
     * @return string
     */
    public function getPassword(): string
    {
        return $this->password;
    }

    /**
     * @param string $password
     * @return ManagerEntity
     */
    public function setPassword(string $password): ManagerEntity
    {
        $this->password = $password;
        return $this;
    }

    /**
     * @return string
     */
    public function getSalt(): string
    {
        return $this->salt;
    }

    /**
     * @param string $salt
     * @return $this
     */
    public function setSalt(string $salt): ManagerEntity
    {
        $this->salt = $salt;
        return $this;
    }

    /**
     * @param string $create_time
     * @return ManagerEntity
     */
    public function setCreateTime(string $create_time): ManagerEntity
    {
        $this->create_time = $create_time;
        return $this;
    }

    /**
     * @return string
     */
    public function getCreateTime(): string
    {
        return $this->create_time;
    }

    /**
     * @param string $delete_time
     * @return ManagerEntity
     */
    public function setDeleteTime(string $delete_time): ManagerEntity
    {
        $this->delete_time = $delete_time;
        return $this;
    }

    /**
     * @return string
     */
    public function getStatus(): string
    {
        return $this->status;
    }

    /**
     * @param string $status
     * @return ManagerEntity
     */
    public function setStatus(string $status): ManagerEntity
    {
        $this->status = $status;
        return $this;
    }

    /**
     * @return string
     */
    public function getToken(): string
    {
        return $this->token;
    }

    /**
     * @param string $token
     * @return ManagerEntity
     */
    public function setToken(string $token): ManagerEntity
    {
        $this->token = $token;
        return $this;
    }

}
